-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post editor: add temporary flag to disable iframe #48064
Conversation
@@ -1,6 +1,7 @@ | |||
{ | |||
"$schema": "https://schemas.wp.org/trunk/block.json", | |||
"apiVersion": 2, | |||
"temporarilyDisableIframe": "I understand that this flag will only work for two releases (6.2 and 6.3) and that the block must be updated to avoid breakage in WP 6.4.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added this for testing. Can't quite get it to work with the schema.
Size Change: +336 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
Flaky tests detected in 00f2e8a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4172789262
|
See #48076. |
What?
This PR adds a flag for blocks to use in
block.json
to disable the iframe TEMPORARILY to give plugin authors the time to update their blocks. It will be removed after two releases.Why?
Some blocks are incompatible with the iframe: for example they use jQuery components in the block edit function which doesn't work in the iframe.
Ideally the block edit function should be a visual representation of the block and ideally it should use the components we provide. Of course you can use third party React components or non React components, but what is rendered in the iframe should be a preview/visual editing field and any UI like popovers and select boxes should be rendered outside of the iframe (for example with the Popover component).
How?
Adds a check to see if all block types are compatible.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast